package ${filePackageName};

import com.alibaba.fastjson.JSON;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;
import java.util.Map;

/**
 * 请求参数
 * @author ${projectAuthor}
 * @version 1.0
 * @date ${nowDate}
 */
@ApiModel(value = "请求参数",description = "请求参数")
public class RequestParam<T> {

    @ApiModelProperty(value = "body请求参数")
    private T body;


    @ApiModelProperty(value = "form参数")
    private Map<String,Object> form;

    @ApiModelProperty(value = "header参数")

    private Map<String,Object> headers;

    @ApiModelProperty(value = "上传文件参数")
    private List<FilePart> parts;

    public List<FilePart> getParts() {
        return parts;
    }

    public void setParts(List<FilePart> parts) {
        this.parts = parts;
    }

    public Map<String, Object> getHeaders() {
        return headers;
    }

    public void setHeaders(Map<String, Object> headers) {
        this.headers = headers;
    }

    public T getBody() {
        return body;
    }

    public void setBody(T body) {
        this.body = body;
    }

    public Map<String,Object> getForm() {
        return form;
    }

    public void setForm(Map<String,Object> form) {
        this.form = form;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
